<template>
  <div>
    {{ fullName }}
    <hr />
    <input type="text" v-model="fullName" />
  </div>
</template>

<script>
export default {
  data() {
    return {
      name: "肖明",
    };
  },
  // 计算机完整写法
  computed: {
    fullName: {
      get() {
        return "张" + this.name;
      },
      set(value) {
        this.name = value;
      },
    },
  },
};
</script>

<style>
</style>